package com.sunthy.mall.model.admin.vo.order;

import java.util.List;

/**
 * @Description: 通过id回显order的一个bean类
 * @Author: XM
 */
public class OrderByIdInfoVo {
    private Integer id;  // 订单号
    private Double amount;// 总金额
    private Integer num; // 数量
    private Integer goodsDetailId; // 商品规格的id
    private Integer state; // 订单的状态码
    private String goods; // 商品name
    private List<OrderInnerSpecInfoId> spec; // 商品的所有规格
    private List<OrderStatesInfo> states = new OrderStatesInfo().getOrderStatesInfoList();// 订单的所有状态
    private OrderCurStateInfoVo curState = new OrderCurStateInfoVo(); // 订单状态
    private OrderCurSpecInfoVo curSpec;// 订单规格

    public OrderByIdInfoVo(Integer id,Double amount, Integer num, Integer goodsDetailId, Integer state, String goods,
                           List<OrderInnerSpecInfoId> spec, int curSpec) {
        this.id = id;
        this.amount = amount;
        this.num = num;
        this.goodsDetailId = goodsDetailId;
        this.state = state;
        this.goods = goods;
        this.spec = spec;

        if (state == 0) {
            curState.setId(0);
        } else if (state == 1) {
            curState.setId(1);
        } else if (state == 2) {
            curState.setId(2);
        } else if (state == 3) {
            curState.setId(3);
        }
        this.curSpec = new OrderCurSpecInfoVo(curSpec);
    }

    public OrderByIdInfoVo() {
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getGoodsDeteilId() {
        return goodsDetailId;
    }

    public void setGoodsDeteilId(Integer goodsDetailId) {
        this.goodsDetailId = goodsDetailId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public List<OrderInnerSpecInfoId> getSpec() {
        return spec;
    }

    public void setSpec(List<OrderInnerSpecInfoId> spec) {
        this.spec = spec;
    }

    public List<OrderStatesInfo> getStates() {
        return states;
    }

    public void setStates(List<OrderStatesInfo> states) {
        this.states = states;
    }

    public OrderCurStateInfoVo getCurState() {
        return curState;
    }

    public void setCurState(OrderCurStateInfoVo curState) {
        this.curState = curState;
    }

    public OrderCurSpecInfoVo getCurSpec() {
        return curSpec;
    }

    public void setCurSpec(OrderCurSpecInfoVo curSpec) {
        this.curSpec = curSpec;
    }
}
